package com.stwitinc.redmine.res.sys;

import com.alibaba.fastjson.JSONObject;
import com.stwitinc.aliyun.STS;
import com.stwitinc.servlet.rest.RESTResource;
import com.stwitinc.servlet.rest.ResourceMethod;
import com.stwitinc.servlet.rest.ReturnType;

public class SysRes extends RESTResource
{
	public static final String MODULE_NAME = "stw_news";

	//@ResourceMethod(returnType = ReturnType.FORWARD, validateToken = true)
	@ResourceMethod(returnType = ReturnType.FORWARD, validateToken = false)
	public String getManagement() {
		return "desktop/sys/management.jsp";
	}

	@ResourceMethod(returnType = ReturnType.JSON, validateToken = true)
	public JSONObject getOssSecurityToken() throws Exception {
		return STS.getOSSAccessToken(MODULE_NAME);
	}
}
